package com.smart.common.config.weixin;


import com.github.binarywang.wxpay.service.WxPayService;
import com.github.binarywang.wxpay.service.impl.WxPayServiceImpl;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


/**
 * 接入微信支付管理服务
 *
 * @author Binary Wang
 * @date 2022-08-22
 */
@Configuration
@ConditionalOnClass
public class WxPayConfiguration {

    /**
     * 微信支付配置服务
     *
     * @return {@code WxPayService}
     */
    @Bean
    @ConditionalOnMissingBean
    public WxPayService wxService() {
        return new WxPayServiceImpl();
    }


}
